package main

import "fmt"

type Temp func(b int)

func demo(temp Temp) {
	temp(1)
}

func demo02(temp []Temp) Temp {
	return func(b int) {
		temp[0](1)
	}
}

func main() {
	var a []Temp
	for i := 0; i < 5; i++ {
		a = append(a, func(b int) {
			fmt.Println(b)
		})
	}
	demo(demo02(a))
}
